package com.jyx.framework.domain.cms.response;

import com.jyx.framework.model.response.ResultCode;
import lombok.ToString;

@ToString
public enum  CmsCode implements ResultCode {


    CMS_ADDPAGE_EXISTS(false,24001,"页面已存在！"),
    CMS_GENERATEHTML_DATAURLISNULL(false,24002,"从页面信息中找不到获取数据的url！"),
    CMS_GENERATEHTML_DATAISNULL(false,24003,"根据页面的数据url获取不到数据！"),
    CMS_GENERATEHTML_TEMPLATEISNULL(false,24004,"页面模板为空！"),
    CMS_GENERATEHTML_HTMLISNULL(false,24005,"生成的静态html为空！"),
    CMS_GENERATEHTML_SAVEHTMLERROR(false,24005,"保存静态html出错！"),
    CMS_PAGE_NOTEXISTS(false,24006,"页面不存在！"),
    CMS_PAGE_ADDFAIL(false,24111,"页面添加失败！"),
    CMS_PAGE_PUBFAIL(false,25111,"页面发布失败！"),
    CMS_SITE_NOTEXISTS(false,25006,"站点信息为空！")
    ;


    boolean success;
    int code;
    String message;

    private CmsCode(boolean success,int code,String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
